package com.zl.credit.util.score;

public class Age {
    public static Integer getAgeScore(Integer age) {
        if (age >= 18 && age <= 22) {
            return 2;
        } else if (age >= 23 && age <= 34) {
            return (age - 23) + 3;
        } else if (age >= 35 && age <= 40) {
            return 15;
        } else if (age >= 41 && age <= 60) {
            return 14 - ((age - 41) / 2);
        } else if (age >= 61) {
            return 3;
        } else {
            return 0;
        }
    }
}
